#ifndef PACKET_H
#define PACKET_H

#include <stdint.h>

typedef enum {
    PACKET_TYPE_CONTROL = 0,
    TYPE_DATA = 1
} packet_type;

typedef enum {
    PACKET_DELIVERY_SYNC = 0,
    PACKET_DELIVERY_ASYNC = 1
} packet_delivery;

typedef enum {
    PACKET_SCOPE_GLOBAL = 0,
    SCOPE_DEVICE_SPECIFIC = 1
} packet_scope;

typedef enum {
    PACKET_DIRECTION_REQUEST = 0,
    PACKET_DIRECTION_RESPONSE = 1
} packet_direction;

void packet_make_packet(char* buffer, packet_type type,
    packet_delivery delivery, packet_scope scope, packet_direction direction,
    uint16_t message_number);

#endif
